<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>gps: E:/CODING/arduino-1.0/libraries/gps/gps.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">gps
   &#160;<span id="projectnumber">1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_6ef22761b4862fd593205c95f7ac3a3d.html">CODING</a></li><li class="navelem"><a class="el" href="dir_a23ad32c709cbe4d21e2bb7aa37b6a3a.html">arduino-1.0</a></li><li class="navelem"><a class="el" href="dir_c17db4ac16776378fe75e5aa45b7fade.html">libraries</a></li><li class="navelem"><a class="el" href="dir_5dae2307f95cc4f8fc1bc98b3ac5969e.html">gps</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">gps.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="gps_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="gps__setup_8h.html" title="SETUP FILE for the GPS utility library.">gps_setup.h</a>&quot;</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#ifndef pi</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00013"></a><span class="lineno"><a class="code" href="gps_8h.html#a1daf785e3f68d293c7caa1c756d5cb74">   13</a></span>&#160;<span class="preprocessor">#define pi 3.14159265</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#ifndef R</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00021"></a><span class="lineno"><a class="code" href="gps_8h.html#a5c71a5e59a53413cd6c270266d63b031">   21</a></span>&#160;<span class="preprocessor">#define R 6371</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment">// LAT LON TYPE ///////////////////////////////////////////////////////////////////////////////////////////////////////</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div>
<div class="line"><a name="l00031"></a><span class="lineno"><a class="code" href="gps_8h.html#ab5d59680aa9d3d5739abf9842e87b455">   31</a></span>&#160;<span class="preprocessor">#define TYPE_LAT 1</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="code" href="gps_8h.html#a1d27c1fc0ada9dc33440b4f88b1a5ef0">   37</a></span>&#160;<span class="preprocessor">#define TYPE_LON 2</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="comment">// NMEA TYPE //////////////////////////////////////////////////////////////////////////////////////////////////////////</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="code" href="gps_8h.html#a63fa90f191fafc997382f5c813d0da97">   47</a></span>&#160;<span class="preprocessor">#define NMEA_RMC                1</span></div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="code" href="gps_8h.html#a28a8dd0c639c486c4b3b57427a8e4719">   54</a></span>&#160;<span class="preprocessor">#define NMEA_PMTKCHN    2</span></div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="comment">// ERROR //////////////////////////////////////////////////////////////////////////////////////////////////////////////</span></div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;</div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="code" href="gps_8h.html#ae4b48f90c078751cbbb179b2d85d6f73">   63</a></span>&#160;<span class="preprocessor">#define NMEA_ERR_FORMAT         (-1)</span></div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00070"></a><span class="lineno"><a class="code" href="gps_8h.html#a2251ae7c698ee31e61e606085442c9e7">   70</a></span>&#160;<span class="preprocessor">#define NMEA_ERR_CHECKSUM       (-2)</span></div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="comment">// VALID //////////////////////////////////////////////////////////////////////////////////////////////////////////////</span></div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="preprocessor">#define VALID_ACTIVE    0x41</span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define VALID_VOID              0x56</span></div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<span class="comment">// FIX MODE ///////////////////////////////////////////////////////////////////////////////////////////////////////////</span></div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<span class="preprocessor">#define MODE_AUTONOMOUS         0x41</span></div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MODE_DIFFERENTIAL       0x44</span></div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define MODE_ESTIMATED          0x45</span></div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="preprocessor">#ifdef PMTKCHN_ENABLE</span></div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="preprocessor"></span><span class="preprocessor">        #ifndef TOTAL_CHANNEL</span></div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;<span class="preprocessor"></span><span class="preprocessor">                #define TOTAL_CHANNEL (66)</span></div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<span class="preprocessor"></span><span class="preprocessor">        #endif</span></div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;<span class="preprocessor"></span><span class="preprocessor">        #if TOTAL_CHANNEL &lt;= 0</span></div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;<span class="preprocessor"></span><span class="preprocessor">                #define TOTAL_CHANNEL (66)</span></div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;<span class="preprocessor"></span><span class="preprocessor">        #endif</span></div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;<span class="preprocessor"></span>        </div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;<span class="preprocessor">        #define STATUS_CHN_IDLE                 0</span></div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;<span class="preprocessor"></span><span class="preprocessor">        #define STATUS_CHN_SEARCHING    1</span></div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;<span class="preprocessor"></span><span class="preprocessor">        #define STATUS_CHN_TRACKING             2</span></div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;<span class="preprocessor">#ifndef gps_h</span></div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define gps_h</span></div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;<span class="preprocessor">#include &quot;Arduino.h&quot;</span></div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div>
<div class="line"><a name="l00107"></a><span class="lineno"><a class="code" href="classgps.html">  107</a></span>&#160;<span class="keyword">class </span><a class="code" href="classgps.html" title="gps class">gps</a></div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;{</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;        <span class="keyword">public</span>:</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;                <a class="code" href="classgps.html#a13b491233eeef0a9934e8d86db776949">gps</a>();</div>
<div class="line"><a name="l00116"></a><span class="lineno"><a class="code" href="classgps.html#a7b0dca0379f5094698d5735b82bae36f">  116</a></span>&#160;                <span class="keywordtype">int</span> <a class="code" href="classgps.html#a7b0dca0379f5094698d5735b82bae36f" title="validity tag">valid</a>;</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;                <span class="keywordtype">float</span> <a class="code" href="classgps.html#a6f0aa175cb89310542170e72e0eaa74c" title="Get the distance between to coordinate.">GetDist</a>(<span class="keywordtype">float</span> Lat1, <span class="keywordtype">float</span> Lon1, <span class="keywordtype">float</span> Lat2, <span class="keywordtype">float</span> Lon2);</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;                <span class="keywordtype">int</span> <a class="code" href="classgps.html#a0818935ee361cc80d45f5decf61b55eb" title="Get the bearing between 2 coordinate.">GetBearing</a>(<span class="keywordtype">float</span> Lat1, <span class="keywordtype">float</span> Lon1, <span class="keywordtype">float</span> Lat2, <span class="keywordtype">float</span> Lon2);</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;                </div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;                <span class="keywordtype">float</span> <a class="code" href="classgps.html#afeb31896befa19a3c0f6d8025eaa3db7" title="convert degree to radian.">degreeToRadian</a>(<span class="keywordtype">float</span> degree);</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;                <span class="keywordtype">float</span> <a class="code" href="classgps.html#afc9cc644ebe767cc38cd6be31ff11c1a" title="Convert Radian to Degree.">radianToDegree</a>(<span class="keywordtype">float</span> radian);</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;                </div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;                <span class="keywordtype">int</span> <a class="code" href="classgps.html#a88ace6e98d9b3ba264f78bf66f8eb0b5" title="Process an NMEA string.">ProcessNmeaStr</a>(<span class="keywordtype">char</span> *nmea, <span class="keywordtype">int</span> Len);</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;                </div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;                <span class="keywordtype">void</span> <a class="code" href="classgps.html#a917af9e2f4feaf978fb1d8d641467849" title="Process $GPRMC NMEA string.">ProcessNmea_RMC</a>(<span class="keywordtype">char</span> *nmea, <span class="keywordtype">int</span> Len);</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;                </div>
<div class="line"><a name="l00132"></a><span class="lineno"><a class="code" href="structgps_1_1_r_m_cstr.html">  132</a></span>&#160;                <span class="keyword">struct </span><a class="code" href="structgps_1_1_r_m_cstr.html" title="Struct to work with $GPRMC string.">RMCstr</a></div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;                {</div>
<div class="line"><a name="l00136"></a><span class="lineno"><a class="code" href="structgps_1_1_r_m_cstr.html#acb546a6f6b504e72a36fa4688e65ecbe">  136</a></span>&#160;                        <span class="keywordtype">char</span> *<a class="code" href="structgps_1_1_r_m_cstr.html#acb546a6f6b504e72a36fa4688e65ecbe">time</a>;</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;                        </div>
<div class="line"><a name="l00140"></a><span class="lineno"><a class="code" href="structgps_1_1_r_m_cstr.html#acc91763564ae3776734cee8d4477ad77">  140</a></span>&#160;                        <span class="keywordtype">char</span> <a class="code" href="structgps_1_1_r_m_cstr.html#acc91763564ae3776734cee8d4477ad77">valid</a>;</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;                        </div>
<div class="line"><a name="l00144"></a><span class="lineno"><a class="code" href="structgps_1_1_r_m_cstr.html#a4ed896260b6169b1b97095f06d48e5be">  144</a></span>&#160;                        <span class="keywordtype">char</span> *<a class="code" href="structgps_1_1_r_m_cstr.html#a4ed896260b6169b1b97095f06d48e5be">lat</a>;</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;                        </div>
<div class="line"><a name="l00148"></a><span class="lineno"><a class="code" href="structgps_1_1_r_m_cstr.html#af8eac42a6b05caea817b1c11c55641ab">  148</a></span>&#160;                        <span class="keywordtype">char</span> <a class="code" href="structgps_1_1_r_m_cstr.html#af8eac42a6b05caea817b1c11c55641ab">latNS</a>;</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;                        </div>
<div class="line"><a name="l00152"></a><span class="lineno"><a class="code" href="structgps_1_1_r_m_cstr.html#ae836e3e350187d8d9b3596b9a86df2f5">  152</a></span>&#160;                        <span class="keywordtype">char</span> *<a class="code" href="structgps_1_1_r_m_cstr.html#ae836e3e350187d8d9b3596b9a86df2f5">lon</a>;</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;                        </div>
<div class="line"><a name="l00156"></a><span class="lineno"><a class="code" href="structgps_1_1_r_m_cstr.html#abf33b9ae2e6e1c4f8c0a6c84f3ace491">  156</a></span>&#160;                        <span class="keywordtype">char</span> <a class="code" href="structgps_1_1_r_m_cstr.html#abf33b9ae2e6e1c4f8c0a6c84f3ace491">lonEW</a>;</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;                        </div>
<div class="line"><a name="l00160"></a><span class="lineno"><a class="code" href="structgps_1_1_r_m_cstr.html#ac10885ed921d6c7cadeb4fd4bb6a62bb">  160</a></span>&#160;                        <span class="keywordtype">float</span> <a class="code" href="structgps_1_1_r_m_cstr.html#ac10885ed921d6c7cadeb4fd4bb6a62bb">knots</a>;</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;                        </div>
<div class="line"><a name="l00164"></a><span class="lineno"><a class="code" href="structgps_1_1_r_m_cstr.html#a7a547353d00aed0be9def4deeb2c0a32">  164</a></span>&#160;                        <span class="keywordtype">float</span> <a class="code" href="structgps_1_1_r_m_cstr.html#a7a547353d00aed0be9def4deeb2c0a32">course</a>;</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;                        </div>
<div class="line"><a name="l00168"></a><span class="lineno"><a class="code" href="structgps_1_1_r_m_cstr.html#a9b8a9f375b9738e93f1c2f007c439244">  168</a></span>&#160;                        <span class="keywordtype">char</span> *<a class="code" href="structgps_1_1_r_m_cstr.html#a9b8a9f375b9738e93f1c2f007c439244">date</a>;</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;                        </div>
<div class="line"><a name="l00172"></a><span class="lineno"><a class="code" href="structgps_1_1_r_m_cstr.html#a5cef3b5fd71d9ff3f4d3fd266d808e29">  172</a></span>&#160;                        <span class="keywordtype">float</span> <a class="code" href="structgps_1_1_r_m_cstr.html#a5cef3b5fd71d9ff3f4d3fd266d808e29">magvar</a>;</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;                        </div>
<div class="line"><a name="l00176"></a><span class="lineno"><a class="code" href="structgps_1_1_r_m_cstr.html#a82f737e9dacbd45b4a6ff02c924e9c39">  176</a></span>&#160;                        <span class="keywordtype">char</span> <a class="code" href="structgps_1_1_r_m_cstr.html#a82f737e9dacbd45b4a6ff02c924e9c39">magvarEW</a>;</div>
<div class="line"><a name="l00179"></a><span class="lineno"><a class="code" href="structgps_1_1_r_m_cstr.html#a53e5a075672ae4f130bc10bcd0dd6afc">  179</a></span>&#160;                        <span class="keywordtype">char</span> <a class="code" href="structgps_1_1_r_m_cstr.html#a53e5a075672ae4f130bc10bcd0dd6afc">mode</a>;</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;                };</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;                </div>
<div class="line"><a name="l00187"></a><span class="lineno"><a class="code" href="structgps_1_1time__s.html">  187</a></span>&#160;                <span class="keyword">struct </span><a class="code" href="structgps_1_1time__s.html" title="time struct">time_s</a></div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;                {</div>
<div class="line"><a name="l00191"></a><span class="lineno"><a class="code" href="structgps_1_1time__s.html#a5b4432ddcc8f3d0b7b21be1f6bfe35a6">  191</a></span>&#160;                        <span class="keywordtype">int</span> <a class="code" href="structgps_1_1time__s.html#a5b4432ddcc8f3d0b7b21be1f6bfe35a6">h</a>;</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;                        </div>
<div class="line"><a name="l00195"></a><span class="lineno"><a class="code" href="structgps_1_1time__s.html#a380581803b4ea02f3cb8783000a495d8">  195</a></span>&#160;                        <span class="keywordtype">int</span> <a class="code" href="structgps_1_1time__s.html#a380581803b4ea02f3cb8783000a495d8">m</a>;</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;                        </div>
<div class="line"><a name="l00199"></a><span class="lineno"><a class="code" href="structgps_1_1time__s.html#a5c958d97065ea30c3ce34d1a89c11868">  199</a></span>&#160;                        <span class="keywordtype">int</span> <a class="code" href="structgps_1_1time__s.html#a5c958d97065ea30c3ce34d1a89c11868">s</a>;</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;                        </div>
<div class="line"><a name="l00203"></a><span class="lineno"><a class="code" href="structgps_1_1time__s.html#ada95d1fe2e1c6d44df58f25ef3ffe855">  203</a></span>&#160;                        <span class="keywordtype">int</span> <a class="code" href="structgps_1_1time__s.html#ada95d1fe2e1c6d44df58f25ef3ffe855">ms</a>;</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;                };</div>
<div class="line"><a name="l00210"></a><span class="lineno"><a class="code" href="structgps_1_1date__s.html">  210</a></span>&#160;                <span class="keyword">struct </span><a class="code" href="structgps_1_1date__s.html" title="date struct">date_s</a></div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;                {</div>
<div class="line"><a name="l00214"></a><span class="lineno"><a class="code" href="structgps_1_1date__s.html#ae5d8c2dd72a8d95efb303d1fba2609a1">  214</a></span>&#160;                        <span class="keywordtype">int</span> <a class="code" href="structgps_1_1date__s.html#ae5d8c2dd72a8d95efb303d1fba2609a1">d</a>;</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;                        </div>
<div class="line"><a name="l00218"></a><span class="lineno"><a class="code" href="structgps_1_1date__s.html#adeacb39c77e5b90d0bb078e0efebc8e4">  218</a></span>&#160;                        <span class="keywordtype">int</span> <a class="code" href="structgps_1_1date__s.html#adeacb39c77e5b90d0bb078e0efebc8e4">m</a>;</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;                        </div>
<div class="line"><a name="l00222"></a><span class="lineno"><a class="code" href="structgps_1_1date__s.html#a87d92fbf148691bea2b87d1576b3a341">  222</a></span>&#160;                        <span class="keywordtype">int</span> <a class="code" href="structgps_1_1date__s.html#a87d92fbf148691bea2b87d1576b3a341">y</a>;</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;                };</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;                </div>
<div class="line"><a name="l00230"></a><span class="lineno"><a class="code" href="structgps_1_1_gps_info__s.html">  230</a></span>&#160;                <span class="keyword">struct </span><a class="code" href="structgps_1_1_gps_info__s.html" title="General gps info.">GpsInfo_s</a></div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;                {</div>
<div class="line"><a name="l00234"></a><span class="lineno"><a class="code" href="structgps_1_1_gps_info__s.html#a9e1830c71eff2b04f26cf0e85a987775">  234</a></span>&#160;                        <a class="code" href="structgps_1_1time__s.html" title="time struct">time_s</a> <a class="code" href="structgps_1_1_gps_info__s.html#a9e1830c71eff2b04f26cf0e85a987775">time</a>;</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;                        </div>
<div class="line"><a name="l00238"></a><span class="lineno"><a class="code" href="structgps_1_1_gps_info__s.html#a4a537de173989f8caeda94831f604c4e">  238</a></span>&#160;                        <a class="code" href="structgps_1_1date__s.html" title="date struct">date_s</a> <a class="code" href="structgps_1_1_gps_info__s.html#a4a537de173989f8caeda94831f604c4e">date</a>;</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;                        </div>
<div class="line"><a name="l00242"></a><span class="lineno"><a class="code" href="structgps_1_1_gps_info__s.html#a14ca6c303afa99cc0cac04d613b50852">  242</a></span>&#160;                        <span class="keywordtype">float</span> <a class="code" href="structgps_1_1_gps_info__s.html#a14ca6c303afa99cc0cac04d613b50852">latd</a>;</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;                        </div>
<div class="line"><a name="l00247"></a><span class="lineno"><a class="code" href="structgps_1_1_gps_info__s.html#a3cf8a3c98e19e6cbc08773500dd31c1f">  247</a></span>&#160;                        <span class="keywordtype">float</span> <a class="code" href="structgps_1_1_gps_info__s.html#a3cf8a3c98e19e6cbc08773500dd31c1f">lond</a>;</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;                        </div>
<div class="line"><a name="l00251"></a><span class="lineno"><a class="code" href="structgps_1_1_gps_info__s.html#aa439aa326e691bbb710f510858718628">  251</a></span>&#160;                        <span class="keywordtype">float</span> <a class="code" href="structgps_1_1_gps_info__s.html#aa439aa326e691bbb710f510858718628">knots</a>;</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;                        </div>
<div class="line"><a name="l00255"></a><span class="lineno"><a class="code" href="structgps_1_1_gps_info__s.html#a1be66abe14f6878fbb8e3b590773d856">  255</a></span>&#160;                        <span class="keywordtype">float</span> <a class="code" href="structgps_1_1_gps_info__s.html#a1be66abe14f6878fbb8e3b590773d856">course</a>;</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;                        </div>
<div class="line"><a name="l00259"></a><span class="lineno"><a class="code" href="structgps_1_1_gps_info__s.html#a0709d52b1f37d828dbfbee6dc26bcf4b">  259</a></span>&#160;                        <span class="keywordtype">float</span> <a class="code" href="structgps_1_1_gps_info__s.html#a0709d52b1f37d828dbfbee6dc26bcf4b">magvar</a>;</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;                        </div>
<div class="line"><a name="l00263"></a><span class="lineno"><a class="code" href="structgps_1_1_gps_info__s.html#a342eb1ae196e7352ac9177901546912b">  263</a></span>&#160;                        <span class="keywordtype">char</span> <a class="code" href="structgps_1_1_gps_info__s.html#a342eb1ae196e7352ac9177901546912b">mode</a>;</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;                };</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;                </div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;                </div>
<div class="line"><a name="l00272"></a><span class="lineno"><a class="code" href="classgps.html#ab9a5b2f24ebab720c5de80180c5132c8">  272</a></span>&#160;                <a class="code" href="structgps_1_1_gps_info__s.html" title="General gps info.">GpsInfo_s</a> <a class="code" href="classgps.html#ab9a5b2f24ebab720c5de80180c5132c8" title="Global variable GPS Information.">GpsInfo</a>;</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;                </div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;                </div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;                <span class="keywordtype">float</span> <a class="code" href="classgps.html#a06860b3e28085a326e192aa31b5a6236" title="NMEA &#39;degree minute.m&#39; to &#39;degree.decimal&#39;.">dmtodd</a>(<span class="keywordtype">char</span> *dm, <span class="keywordtype">char</span> NSEW, <span class="keywordtype">int</span> LatOrLon);</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;                </div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;                <span class="comment">//date time</span></div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;                <span class="keywordtype">boolean</span> <a class="code" href="classgps.html#ac771c6be4eb9da5e9c996bba209ecfed" title="NMEA RMC time string to time_s struct.">nttots</a>(<span class="keywordtype">char</span> *timestr, <a class="code" href="structgps_1_1time__s.html" title="time struct">time_s</a> &amp;timeReturn);</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;                <span class="keywordtype">void</span> <a class="code" href="classgps.html#a3e36f5a90e338203a540406a480a89ab" title="Format a time string in char *time.">gettimestr</a>(<span class="keywordtype">char</span> *time);</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;                <span class="keywordtype">boolean</span> <a class="code" href="classgps.html#a2f7a4e38be09e9e4260c0d539db8fcc7" title="NMEA RMC date string to date_s struct.">ndtods</a>(<span class="keywordtype">char</span> *datestr, <span class="keywordtype">int</span> fromtype, <a class="code" href="structgps_1_1date__s.html" title="date struct">date_s</a> &amp;dateReturn);</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;                <span class="keywordtype">void</span> <a class="code" href="classgps.html#a03933dd318759e475934d53cf187d7e0" title="Format a date string in char *date.">getdatestr</a>(<span class="keywordtype">char</span> *date);</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;                </div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;                <span class="comment">//Speed Conversion</span></div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;                <span class="keywordtype">float</span> <a class="code" href="classgps.html#a0bf6b4d518da457b1fe0402c44925748" title="Convert Knots to Kilometers per Hour.">ktstokmh</a>(<span class="keywordtype">float</span> kts);</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;                <span class="keywordtype">float</span> <a class="code" href="classgps.html#a5f1bdb341a466b9bf565b6ec36ecd625" title="Convert Knots to Miles Per Hour.">ktstomph</a>(<span class="keywordtype">float</span> kts);</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;                </div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;<span class="preprocessor">#ifdef PMTKCHN_ENABLE</span></div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00294"></a><span class="lineno"><a class="code" href="structgps_1_1channel__s.html">  294</a></span>&#160;                <span class="keyword">struct </span><a class="code" href="structgps_1_1channel__s.html" title="channel information">channel_s</a></div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;                {</div>
<div class="line"><a name="l00298"></a><span class="lineno"><a class="code" href="structgps_1_1channel__s.html#ac17da0c87b00cf224dd080770a906f29">  298</a></span>&#160;                        uint8_t <a class="code" href="structgps_1_1channel__s.html#ac17da0c87b00cf224dd080770a906f29">svid</a>;</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;                        </div>
<div class="line"><a name="l00302"></a><span class="lineno"><a class="code" href="structgps_1_1channel__s.html#a9a12747fd682a6bd33370e5488b40514">  302</a></span>&#160;                        uint8_t <a class="code" href="structgps_1_1channel__s.html#a9a12747fd682a6bd33370e5488b40514">snr</a>;    <span class="comment">// Signal to Noise Ratio</span></div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;                        </div>
<div class="line"><a name="l00306"></a><span class="lineno"><a class="code" href="structgps_1_1channel__s.html#aac5a5d9b6a4d78cefcc5581d9c40dac3">  306</a></span>&#160;                        uint8_t <a class="code" href="structgps_1_1channel__s.html#aac5a5d9b6a4d78cefcc5581d9c40dac3">status</a>; <span class="comment">// 0: Idle / 1: Searching / 2: Tracking</span></div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;                };</div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;                </div>
<div class="line"><a name="l00315"></a><span class="lineno"><a class="code" href="classgps.html#abf96b08c94a86b854ac2f61e1c8137dc">  315</a></span>&#160;                <a class="code" href="structgps_1_1channel__s.html" title="channel information">channel_s</a> <a class="code" href="classgps.html#abf96b08c94a86b854ac2f61e1c8137dc" title="Global Channel Info.">chan</a>[<a class="code" href="gps__setup_8h.html#af98456070a63f454dbd60f56a7907616" title="Override the total channel count.">TOTAL_CHANNEL</a>];</div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;                <span class="keywordtype">void</span> <a class="code" href="classgps.html#ae4c4be1a399edf51f4d9c11f017791ea" title="Process $PMTKCHN &#39;NMEA style&#39; string.">ProcessNmea_PMTKCHN</a>(<span class="keywordtype">char</span> *nmea, <span class="keywordtype">int</span> Len);</div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;<span class="preprocessor">#endif          </span></div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;<span class="preprocessor">#ifdef CHECKSUM_ENABLE</span></div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;<span class="preprocessor"></span>                <span class="keywordtype">boolean</span> <a class="code" href="classgps.html#ac06c909571175bf7daa520d9f375ad84" title="Check NMEA Checksum.">CheckNmeaChecksum</a>(<span class="keywordtype">char</span> *nmea, <span class="keywordtype">int</span> Len);</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;                <span class="keywordtype">int</span> <a class="code" href="classgps.html#a6d3483d4e413979a88bff31ec5a4eca4" title="Get checksum.">getCheckSum</a>(<span class="keywordtype">char</span> *<span class="keywordtype">string</span>);</div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;<span class="preprocessor">#endif  </span></div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;        <span class="keyword">private</span>:</div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;                </div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;                </div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;};</div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;</div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;<span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat May 26 2012 18:48:47 for gps by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1
</small></address>
</body>
</html>
